/*
 * Created by SharpDevelop.
 * User: kktn
 * Date: 11.07.2006
 * Time: 14:17
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */

using System;
using TagTool.Core;
using System.Collections.Generic;
using TagTool.GraphicTypes;

namespace TagTool.Nodes.Misc
{

	public class TagList : ObjectCacheTemplate<Shape>
	{
		private Shape zero = new Shape();
		
		public TagList() : base()
		{
			Name = "Shapelist";
			zero.Update();
		}
		
		override protected Shape Zero
		{
			get 
			{
				return zero;
			}
		}

		public override void Update(Object sender)
		{
			base.Update(sender);
			if (this.objectList.Count > 100)
			{
				this.objectList.RemoveAt(0);
				count.Value = (double)objectList.Count;
				CastTrigger();
			}
		}
		
	}
}
